package com.restaurant.springboot.controller;

import com.restaurant.springboot.service.CommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("api/admin/comment")
public class AdminCommentController {


    @Autowired
    private CommentService commentService;

    /**
     * 删除评论 管理者特权
     * @param commentId
     */
    @DeleteMapping("{commentId}")
    public void deleteComment(@PathVariable int commentId) {
        commentService.deleteComment(commentId);
    }

}
